import request from '@/utils/request';

export function getEntity(pid) {
  return request({
    url: '/rest/api/noticeList/' + pid,
    method: 'get'
  });
}

export function userComponent(params) {
  return request({
    url: '/rest/api/noticeList/object',
    method: 'get',
    params
  });
}

export function getLabels(params) {
  return request({
    url: '/rest/api/noticeList/list/label',
    method: 'get',
    params
  });
}
export function getDatas(params) {
  return request({
    url: '/rest/api/noticeList/list/data',
    method: 'get',
    params
  });
}

export function getDataPage(params) {
  return request({
    url: '/rest/api/noticeList/list/page',
    method: 'get',
    params
  });
}

export function getPage(params) {
  return request({
    url: '/rest/api/noticeList/data/page',
    method: 'get',
    params
  });
}

export function updateContext(data) {
  return request({
    url: '/rest/api/noticeList/object',
    method: 'post',
    data
  });
}

export function queryAllNewsTemplate(params) {
  return request({
    url: 'rest/api/template/news/analysis/list',
    method: 'get',
    params
  });
}

export function queryAllNewsTemplatePage(params) {
  return request({
    url: 'rest/api/template/news/analysis/list/page',
    method: 'get',
    params
  });
}

export default { getEntity, getLabels, getDatas, getDataPage, getPage, userComponent, updateContext };
